package com.inspur.jxpcxt.service;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;

import com.inspur.jxpcxt.constants.ServerConstants;
import com.inspur.jxpcxt.utils.CommonService;

public class RetrieveService {
	@SuppressWarnings("deprecation")
	public static String RetriveByClientGet(String sno,String findpswd){
			HttpClient client = new DefaultHttpClient();
			//拼装路径
			String path = null;
			
			try {
				path = "http://"+ServerConstants.SERVER_IP+":8080/Web/LoginServlet?sno="
						+URLEncoder.encode(sno)
						+"&findpswd="
						+URLEncoder.encode(findpswd,"UTF-8")
						+"&service="
						+URLEncoder.encode(ServerConstants.SERVER_RETRIVE_SERVICE, "UTF-8");
			} catch (UnsupportedEncodingException e) {
				e.printStackTrace();
			}
		return CommonService.serviceRequest(path, client);
			
	}
}
